﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Cloud Ninja Polyglot Persistence Commerce</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    <script type="text/javascript" src="~/Scripts/knockout-2.2.1.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/common.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/spa.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/commerce-api.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/signin.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/product-model.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/ecommerce.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/products.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/product.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/product-details.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/recommendations.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/review-details.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/cart.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/recent.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/orders.js"></script>
    <script type="text/javascript" src="~/Scripts/ECommerce/order.js"></script>
    @*    <script type="text/javascript" src="~/foundation/js/foundation.min.js"></script>
    *@
    <link type="text/css" rel="stylesheet" href="~/foundation/css/foundation.css" />

</head>
    <body products-uri="@ViewBag.ProductsUri"
          carts-uri="@ViewBag.CartsUri"
          session-uri="@ViewBag.SessionUri"
          recommendations-uri="@ViewBag.RecommendationsUri"
          orders-uri="@ViewBag.OrdersUri"
        >
    <header>
        <div class="content-wrapper">
            <a href="#"><img src="~/Images/logo.png" id="logo" /></a>
            <section id="login" data-bind="with: signInView">
                <span data-bind="visible: !!currentUser(), text: currentUser()"></span>
                <a href="javascript:void(0)" class="toggle-signin"  data-bind="visible: !currentUser()">Sign In</a>
                <a href="javascript:void(0)" class="toggle-signin" data-bind="visible: !!currentUser(), click: signout">Sign Out</a>
            </section>
        </div>
    </header>
    <div id="body">
        <div id="search-bar" class="row">
            <div class="large-6 columns">
                <div data-bind="with: context">
                    <input type="search" data-bind="value: searchTerm, enterPressed: $parent.search" placeholder="Search Products" />           
                    <button id="search-button" data-bind="click: $parent.search">GO</button>
                </div>
            </div>
            <div class="large-6 columns">
                <a href="#cart" data-bind="cartIcon: context.cart().totalCount()">
                    <div class="count cart-icon-count"></div>
                </a>
            </div>
        </div>
        @RenderSection("featured", required: false)
        <section class="main-content">
            @RenderBody()
        </section>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @RenderSection("scripts", required: false)

    @*    <script type="text/javascript">
        $(document).foundation();
    </script>*@
</body>
</html>
